Bentley Map V8i (SELECTseries 10) Help

Importing CSV Files

For Bentley Map to recognize CSV (and ODBC) sources, a special file, called a VRT file, needs to be created. This is a text file that describes the import data, the columns for the coordinates, the feature name and the coordinate system for the data. The sample of point type CSV data shown below was originally at: http://www.indexgeo.com.au/data/town-aus/town_aus.csv

This shows the locations of some Australian towns. A sample VRT file used to define the contents of this file for the import tool is shown below.

Note: This file was edited slightly. One column name is prefaced by a ‘#’ sign which is an illegal character in XFM. Either the input data can be edited to have this removed or it can be remapped during the import process.

<OGRVRTDataSource>
  <OGRVRTLayer name="town_aus">
    <SrcDataSource>town_aus.csv</SrcDataSource>
    <GeometryType>wkbPoint</GeometryType>
    <LayerSRS>WGS84</LayerSRS>
    <GeometryField encoding="PointFromColumns"
x="longitude" y="latitude"/>
  </OGRVRTLayer>
</OGRVRTDataSource>

This file describes the feature name, the filename, the layer type (in this case a point layer), the spatial reference system and the names of the columns in which to find the X and Y (and optionally Z) values.

Note: By default, the file referenced by SrcDataSource is located in the same folder as the active design file. If the file is in another folder then make sure the filename is prefaced by a fully qualified directory path.

The source data looks like this:

longitude,latitude,city name
145.768,-16.915,Cairns
146.801,-19.265,Townsville
150.501,-23.365,Rockhampton
139.485,-20.715,Mount Isa 

To test this process use ref_cities_lat_long.dgn delivered with Bentley Map in \WorkSpace\Projects\Examples\Geospatial\coordinate\dgn\otf

The LayerSRS field defines the geographic coordinate system (GCS) for the data. It can refer to an existing GCS in the Bentley library as shown or it can describe a GCS using WKT syntax. An example is below.

<LayerSRS>PROJCS ["LA83-SF" [GEOGCS ["NAD83", DATUM
["North American Datum of 1983", SPHEROID ["GRS 1980 (EPSG ID 7019)",
6378137.0, 298.257222101]], PRIMEM [ "Greenwich", 0.000000 ], PROJECTION
["Lambert_Conformal_Conic"],PARAMETER["Standard_Parallel_1",30.7],PARAMETER["Standard_Parallel_2",29.3],PARAMETER["Central_Meridian",-91.3333333333333],PARAMETER["Latitude_Of_Origin",28.5],PARAMETER["False_Easting",3280833.333],PARAMETER["False_Northing",0],
UNIT ["Foot_US",0.30480060960121924]]]]</LayerSRS>